package bancosys.tec.services.example;

import jmine.tec.di.annotation.Injected;
import jmine.tec.services.annotations.Execution;
import jmine.tec.services.annotations.Output;
import jmine.tec.services.annotations.ServiceImplementor;
import jmine.tec.services.api.ActionsEnum;
import bancosys.tec.component.ControllerLocator;
import bancosys.tec.persist.dao.BaseDAOFactory;
import bancosys.tec.persist.persister.PersisterFactory;

/**
 * @author takeshi
 * @deprecated usa metodos deprecados
 */
@ServiceImplementor(action = ActionsEnum.CONFIRMAR)
public class ServicoComDI {

    private final BaseDAOFactory baseDAOFactory;

    private PersisterFactory fac;

    public ServicoComDI(@Injected BaseDAOFactory baseDAOFactory) {
        super();
        this.baseDAOFactory = baseDAOFactory;
        this.baseDAOFactory.toString();
    }

    @Injected
    public void injetaPersisterFactory(PersisterFactory fac) {
        this.fac = fac;
    }

    @Execution
    @Output(propertyName = "nada")
    public Object doSomething(@Injected ControllerLocator locator) throws Exception {
        this.fac.toString();
        return locator;
    }

}
